<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分公司添加</title>
    <link rel="stylesheet" href="/admin/layui/css/layui.css" media="all">
    <script src="/admin/layui/layui.js"></script>
</head>
<body>

<label style="padding-left:100px;line-height:100px;padding-bottom:60px;">添加分公司</label>
<form class="layui-form" action="/admin/add_companyin" enctype="multipart/form-data" method="post">
    @csrf
    <div class="layui-form-item">
        <label class="layui-form-label">分公司名称</label>
        <div class="layui-input-inline">
            <input type="text" name="company" required lay-verify="required" placeholder="请输入分公司名称" autocomplete="off" class="layui-input" value="">
    </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">地址:</label>
        <div class="layui-input-inline">
            <input type="text" name="company_place" required lay-verify="required" placeholder="请输入公司所在地理位置" autocomplete="off" class="layui-input" value="">
        </div>
        <div class="layui-form-mid layui-word-aux">精确到某路某栋牌号</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">公司星级:</label>
        <div class="layui-input-block">
            <select name="company_level" lay-verify="required">
                <option value=""></option>
                <option value="2">二星</option>
                <option value="3">三星</option>
                <option value="4">四星</option>
                <option value="5">五星</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态:</label>
        <div class="layui-input-block">
            <select name="company_status" lay-verify="required">

                <option value=""></option>

                <option value="正在营业">正在营业</option>
                <option value="歇业中">歇业中</option>
                <option value="整改中">整改中</option>
                <option value="视察中">视察中</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分公司总经理:</label>
        <div class="layui-input-block">
            <select name="company_manager" lay-verify="required">
                <option value=""></option>
               <?php foreach($pp as $people){?>
                <option value="{{$people -> admin_truename}}">{{$people -> admin_company}} {{$people -> admin_truename}}</option>
                <?php }?>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分公司副经理:</label>
        <div class="layui-input-block">
            <select name="company_managermin" lay-verify="required">
                <option value=""></option>
                <?php foreach($pp as $people){?>
                <option value="{{$people -> admin_truename}}">{{$people -> admin_company}} {{$people -> admin_truename}}</option>
                <?php }?>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input class="layui-btn" type="submit" value="添加"/>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</body>
</html>
